package te;

import java.util.Scanner;

public class returnye {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入一个四位数整数:");
		int n=sc.nextInt();
		int a, b, c, d, s;
		if(n>1000 && n<10000){
			a = n / 1000;
			b = n / 100 % 10;
			c = n / 10 % 10;
			d = n % 10;
			s = d * 1000 + c * 100 + b * 10 + a;
			System.out.println("反转后数为：" + s);
		}else {
			System.out.println("输入不合法！！请输入4位整数：");
			return;
		}
		System.out.println();

	}

}
